#if SERVER
using ActorSystem;
using Net;
using Net.AI;
using Net.Common;
using Net.Entities;
using Net.Share;
using Net.System;

namespace Example2
{
    public partial class AIMonster : Actor
    {
        public AgentEntity Agent;
        public Player target; //攻击对象
        internal Vector3 pointCenter;
        internal Vector3 destination;
        internal float idleTime;
        public int roleInCount; //有主角在这个区域才能添加操作, 否则会堆积很多数据

        public override void OnUpdate()
        {
            if (Property.IsDeath)
                return;
            controller.Update();
        }

        public override void OnDeath(Actor target)
        {
            _ = TimerManager.Event.AddEvent(10f, () =>
            {
                target = null;
                Property = new NormalProperty();
            });
        }
    }
}
#endif